home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr48 / 386p_200.zip / 386MIXER.INC < prev    next >
Text File  |  1994-10-28  |  6KB  |  130 lines

  1.  
  2. extrn _MixInit:dword
  3. ;               Initializes sound system
  4. ;               in: eax = dac playback frequency
  5. ;                   edx = dac sample size (  8,  16 == 8bit,16bit mono
  6. ;                                           -8, -16 == 8bit,16bit stereo)
  7. ;                   ecx = dac mixer feedback frequency
  8. ;                   ebx = wavetable playback frequency
  9. ;                   esi = wavetable sample size (same values as dac)
  10. ;                   edi = wavetable active channels
  11. ;               out: eax,...,edi modified to the nearest values
  12. ;                    the current driver can support
  13. ;
  14. ;               The "dac mixer feedback frequency" is the frequency
  15. ;               the mixer system "feeds" a new mixed sound data block
  16. ;               to the sound system.
  17. ;               Given the current 4k block limit the lowest "feed"
  18. ;               frequencies can be:
  19. ;               Frequency      8bit   16bit/8bit_stereo  16bit_stereo
  20. ;                  8000         2Hz     4Hz               8Hz
  21. ;                 11000         3Hz     6Hz              12Hz
  22. ;                 22000         6Hz    12Hz              24Hz
  23. ;                 44100        11Hz    22Hz              44Hz
  24. ;
  25. ;               For good "animation/sound feedback" it is better to
  26. ;               choose a 30..35Hz feedback frequency.
  27. ;
  28. ;               DAC "soft channels" and Wavetable "hard channels"
  29. ;               are numbered starting from 0.
  30.  
  31. extrn _MixShutDown:dword
  32. ;               Shuts down mixer system (automatically called by _Exit)
  33.  
  34. extrn _MixSetUp:dword
  35. extrn _MixControls:dword
  36. ;               are pointers to menu descriptions useful
  37.                          to customize the sound system.
  38.  
  39. extrn _SndPlay:dword
  40. ;         Play sound
  41. ;         in: eax= channel   (-1 = autorotate)
  42. ;             edx= sound handle ( 0 = silence)
  43.  
  44. extrn _SndPlay:dword
  45. ;         Set "default" sound to play after the current sound is terminated
  46. ;         in: eax= channel   (-1 = set this on ALL autorotating mixer channels)
  47. ;             edx= sound handle ( 0 = silence)
  48.  
  49. extrn _SndLoad:dword
  50. ;         Loads a sound file (currently it can only be an 8bit VOC file)
  51. ;         in: esi= pointer to filename
  52. ;         out: if CARRY CLEAR then eax= sound handle
  53.  
  54. extrn _SndMark:dword
  55. ;         "Marks" the current sound heap
  56. ;         out: eax= sound heap mark
  57.  
  58. extrn _SndRelease:dword
  59. ;            "Releases" a slice of the sound heap
  60. ;            in: eax= mark (bottom of heap slice to cut)
  61. ;                          ( 0 == cut from top to bottom)
  62.  
  63. extrn _SndVolume:dword
  64. ;           Set sound channel volume
  65. ;           in:
  66. ;           eax= channel ( -1 = set volume of all autorotating channels)
  67. ;           edx= volume  (0..200)  (0=silence 200=maximum output)
  68. ;           (this function can be ignored if you want)
  69.  
  70. extrn _SndRotate:dword
  71. ;           Sets channel rotation limits
  72. ;           in: eax=lowest rotating sound channel, edx=highest rotating channel
  73. ;           out: eax=new lowest rot. channel, edx=new highest rot. channel
  74. ;           Notice that if the wavetable system has more channels
  75. ;           then the "software mixer", the extra wavetable channels
  76. ;           can only be used for autorotation.
  77. ;           To see how many channels the mixer supports, call this with
  78. ;           eax=0 (lowest channel) and edx = 0FFFFFFFFh ( 4 giga channels!!!!)
  79. ;           and see what is the new value of edx
  80. ;           (edx = highest channel = number_of_channels -1)
  81.  
  82. extrn _SndReSample:dword
  83. ;             Resample sound to add effects and copies the result
  84. ;             to a new handle.
  85. ;             in:
  86. ;               eax=sound handle (this won't be modified)
  87. ;               dl,dh = left,right channel volume % (0..200)
  88. ;                       (0= nothing, 100 = same volume, 200 = twice the volume)
  89. ;               cx, bx = left,right channels sound delay in milliseconds
  90. ;               bp = speed % (0..200) ( 100= same speed, 200= twice the speed)
  91. ;               UPPER WORDS of edx,ecx,ebx,ebp MUST BE ZERO
  92. ;               (they will be used to add more sound control parameters
  93. ;                in a future release, i plan to add "real" 3d sound
  94. ;                and other nice things)
  95. ;             out:
  96. ;               eax= handle for resampled sound
  97. ;             N.B. If the mixer has "mix on the flight" sound effects
  98. ;                  or if it can exploit some sound card features
  99. ;                  the new handle points to a different header
  100. ;                  but the sound data can be the same
  101. ;                  (so instead of copying it, just add a pointer to the
  102. ;                   "original" sound data)
  103.  
  104. ; LOW LEVEL DAC DEVICE INTERFACE
  105.  
  106. extrn _XSDCheck:dword
  107. ;                  Called By _MixInit
  108. ;                  must return CARRY SET if SOUND CARD IS NOT DETECTED
  109.  
  110. extrn _XSDOn:dword
  111. ;                  Called by _MixInit with the same parameters it received
  112. ;                  when called.
  113. ;                  This has to set up dma and irq handling and initialize
  114. ;                  the sound system.
  115. ;                  It includes the mixing routine.
  116.  
  117. extrn _XSDOff:dword
  118. ;       Called by _MixShutDown
  119.  
  120. extrn _XSDSetup:dword
  121. extrn _XSDControls:dword
  122. ;       pointers to menu data for custom configuration
  123.  
  124. ;Wavetable devices and other things needs to hook the upper level functions
  125. ;(sorry, i know what a Gravis can do, but i hear the newest wavetable
  126. ; synthesis boards have way powerful DSPs and other nice things
  127. ; that cannot be "framed" into a fixed low level interface, better let 'em
  128. ; hook the upper level functions)
  129.  
  130.